﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Utils
{
    class Utils2
    {
        private static Utils2 Ins = null;
        private static readonly object obj = new object();
        private Utils2() { }
        public static Utils2 getInstance()
        {
            lock (obj)
            {
                if (Ins == null) Ins = new Utils2();

                return Ins;
            }            
        }
        public void fun1()
        {
            Console.WriteLine("第一个方法!");
        }
    }
}
